<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>topic</title>
</head>
<body>
{% extends "learn_logs/base.html" %}
{% block header %}
    <h2>{{topic}}</h2>
{% endblock header %}
{% block content %}
    <p>
        <a href="{% url 'learn_logs:new_entry' topic.id %}">add a new entries</a>
    </p>
    {% for entrie in entries %}
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3>
                    {{entrie.date_added}}
                    <small>
                            <a href="{% url 'learn_logs:edit_entry' entrie.id %}">edit entry</a>
                    </small>
                    <small>
                            <a href="{% url 'learn_logs:delete_entry' entrie.id %}">delete entry</a>
                    </small>
                </h3>
            </div>
            <div class="panel-body">
                {{entrie.text|linebreaks}}
            </div>
        </div>
    {% empty %}
        there are no entrie for this topic yet
    {% endfor %}


{% endblock content %}
</body>
</html>